package stylistcrm.core.services.user;

/**
 * Created by yanwc on 2016/8/31.
 */
public enum EnumUserRole {
    MANAGER(1,"系统管理员"),
    /**
     * 搭配师
     */
    STYLIST(2,"搭配师"),

    /**
     * 设计师
     */
    DESIGNER(3,"设计师"),

    /**
     * 门店负责人
     */
    CHARGEOFSTORE(4,"门店负责人");

    private Integer code;

    private String desc;

    private EnumUserRole(Integer code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public Integer getCode(){
        return code;
    }

    public String getDesc(){
        return desc;
    }

    public static EnumUserRole getEnum(Integer code) {

        for (EnumUserRole enumValue : EnumUserRole.values()) {
            if (enumValue.getCode().equals(code))
                return enumValue;
        }

        return null;
    }
}
